package com.ocom.payhandle.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ocom.payhandle.vo.DeviceInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface IDaoDeviceVo extends BaseMapper<DeviceInfoVo> {


    @Select("SELECT d.point_id,d.device_name,p.point_name,p.merch_id,merch_name FROM `xf_device_info` d LEFT JOIN xf_point_info p on d.point_id=p.point_id LEFT JOIN xf_merchant_info m on p.merch_id=m.merch_id WHERE d.device_no=#{machno} and d.com_id=#{companyID}")
    public DeviceInfoVo selectPointId(@Param("machno") String machno,@Param("companyID") Long companyID);
}
